<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>运营平台</title>

      <import type="css" basepath="__CSS__" file="bootstrap" />
	<import type="css" basepath="__CSS__" file="datetimepicker" />
	<import type="css" basepath="__CSS__" file="fontawesome" />
	<import type="css" basepath="__CSS__" file="fonts" />
	<import type="css" basepath="__CSS__" file="bootgrid" />
	<import type="css" basepath="__CSS__" file="style" />
	<import type="css" basepath="__CSS__" file="newStudentWeb" />
	
	
</head>

<body>
<div class="topNav">
    <span class="text"><i class="iconfont">&#xe607;</i><a href="/main" target="rightFrame">首页</a>&gt;<span>系统管理</span>&gt;<span>区域管理</span></span>
</div>

<div class="contain">
    <div class="pageTitle">
        <h2 class="title">区域管理</h2>
    </div>
    <a href="{:U("Area/add")}"> <button type="button" class="btn btn-success btn-lg bannerMangeMargin">+ 新增</button></a>

    <div class="tableBoxOne">
        <div class="scroll">
            <table id="grid" class="table table-bordered" data-selection="false" data-multi-select="false" data-row-select="false" data-keep-selection="false">
                <thead>
                <tr>
                    <th data-column-id="01" data-width="80" >序号</th>
                    <th data-column-id="02" data-width="100">省</th>
                    <th data-column-id="03" data-width="100">市</th>
                    <th data-column-id="04" data-width="100">大学</th>
                    <th data-column-id="05" data-width="120"  data-formatter="regionMange" data-sortable="true">操作</th>
                </tr>
                </thead>
                <tbody>
                <foreach name="list" item="item">
                <tr>
                    <td>{$item.id}</td>
                    <td>{$item.pro_name}</td>
                    <td>{$item.city_name}</td>
                    <td>{$item.school}</td>
                    <td>
                        <a href="{:U('Area/edit','&id='.$item['id'])}">编辑</a>
                        <a href="javascript:" id="{$item.id}">删除</a>
                    </td>
                </tr>
               </foreach>
                </tbody>
            </table>
              {$page}
        </div>
    </div>
</div>

<script src="/App/Admin/public/js/jquery-2.1.1.min.js"></script>
<script src="/App/Admin/public/js/bootstrap.min.js"></script>
<script src="/App/Admin/public/js/jquery.datetimepicker.js"></script>
<script src="/App/Admin/public/js/jquery.bootgrid.min.js"></script>
<script src="/App/Admin/public/js/jquery.bootgrid.fa.min.js"></script>
<script src="/App/Admin/public/js/time.js"></script>


<script type="text/javascript">
$('[href="javascript:"]').click(function(){
    var t=$(this);
    var id=$(this).attr("id");
    var mymessage=confirm("你确定删除该区域");  
    if(mymessage==true)  
    {  
       
		 $.post('{:U('Area/del')}',{id:id},function(data){
            if(data.status==100){
                    t.parent().parent().css("display","none");
            }else{
                alert("该区域有商家不能删除");
            }
        });
     }  
    else if(mymessage==false)  
    {  
        
    }     

});
</script>
</body>

</html>